Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager): block gossiping misbehavior detection #1117

Open
wants to merge 29 commits into
base: srene/fix-test-p2p-validation
Choose a base branch
from

Conversation

srene
Copy link
Contributor

@srene srene commented Oct 2, 2024

PR Standards

ADR: Optimistic Block Gossiping Misbehavior - Part 1
ADR: Optimistic Block Gossiping Misbehavior - Part 2

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close #1109 #1116

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@srene srene self-assigned this Oct 2, 2024
@srene srene requested a review from a team as a code owner October 2, 2024 15:49
@srene srene marked this pull request as draft October 2, 2024 15:49
block/validate.go Fixed Show fixed Hide fixed
block/manager.go Fixed Show fixed Hide fixed
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 34.41296% with 162 lines in your changes missing coverage. Please review.

Project coverage is 18.63%. Comparing base (54e2fa5) to head (dd08d96).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...com/dymensionxyz/dymint/settlement/mock_ClientI.go 0.00% 48 Missing ⚠️
block/validate.go 13.95% 37 Missing ⚠️
types/pb/dymint/state.pb.go 0.00% 30 Missing and 2 partials ⚠️
...github.com/dymensionxyz/dymint/store/mock_Store.go 0.00% 15 Missing ⚠️
settlement/dymension/dymension.go 54.54% 10 Missing ⚠️
block/retriever.go 73.33% 7 Missing and 1 partial ⚠️
block/manager.go 86.11% 4 Missing and 1 partial ⚠️
settlement/local/local.go 71.42% 3 Missing and 1 partial ⚠️
settlement/grpc/grpc.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1117      +/-   ##
==========================================
- Coverage   19.54%   18.63%   -0.91%     
==========================================
  Files         165      168       +3     
  Lines       41268    44785    +3517     
==========================================
+ Hits         8065     8346     +281     
- Misses      32034    35232    +3198     
- Partials     1169     1207      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@srene srene force-pushed the srene/1109-state-update-validation branch 3 times, most recently from debc18c to fcd2eb0 Compare October 8, 2024 18:13
@srene srene changed the base branch from main to feat/adr-fraud-handling October 8, 2024 18:13
uerrors.ErrGroupGoLog(eg, m.logger, func() error {
return m.ValidateLoop(ctx)
})
go uevent.MustSubscribe(ctx, m.Pubsub, "syncLoop", settlement.EventQueryNewSettlementBatchAccepted, m.onNewStateUpdate, m.logger)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
return m.ValidateLoop(ctx)
})
go uevent.MustSubscribe(ctx, m.Pubsub, "syncLoop", settlement.EventQueryNewSettlementBatchAccepted, m.onNewStateUpdate, m.logger)
go uevent.MustSubscribe(ctx, m.Pubsub, "validateLoop", settlement.EventQueryNewSettlementBatchFinalized, m.onNewStateUpdateFinalized, m.logger)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@srene srene changed the base branch from feat/adr-fraud-handling to srene/fix-test-p2p-validation October 9, 2024 11:53
@srene srene force-pushed the srene/1109-state-update-validation branch from 7e8a12a to 54d729b Compare October 9, 2024 13:20
@srene srene marked this pull request as ready for review October 10, 2024 09:27
@srene srene changed the title feat(manager): state update validation feat(manager): block gossiping misbehavior detection Oct 10, 2024
@srene srene linked an issue Oct 10, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant